package com.guotd.ticketSystem.mapper;

import com.guotd.ticketSystem.entity.Flight;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.util.List;

public interface FlightMapper {

    List<Flight> getFlights();

    List<Flight> selectFlight(@Param("fromAirport")String fromAirport, @Param("toAirport")String toAirport, @Param("fromDate")Date fromDate);

    int addFlight(@Param("id") String id,
                  @Param("planeId") String planeId,
                  @Param("name") String name,
                  @Param("airlineId")String airlineId,
                  @Param("scheduleId") String scheduleId);

    int delFlight(@Param("id") String id);

    int updateFlight(@Param("id") String id,
                  @Param("name") String name,
                  @Param("planeId") String planeId,
                  @Param("airlineId")String airlineId,
                  @Param("scheduleId") String scheduleId);
}
